<template>
  <div class="page-wide">
    <a-row :gutter="24">
      <a-col :sm="24" :md="12" :xl="10" :style="{ marginBottom: '15px' }">
        <run-info></run-info>
        <system-attribute></system-attribute>
      </a-col>
      <a-col :sm="24" :md="12" :xl="14" :style="{ marginBottom: '15px' }">
        <score-info></score-info>
        <trend-statistics></trend-statistics>
      </a-col>
    </a-row>
  </div>
</template>

<script>
// import moment from 'moment'
import runInfo from './modules/runInfo'
import scoreInfo from './modules/scoreInfo'
import trendStatistics from './modules/trendStatistics'
import systemAttribute from './modules/systemAttribute'
export default {
  name: 'business',
  // mixins: [mixinDevice],
  components: {
    runInfo,
    scoreInfo,
    trendStatistics,
    systemAttribute
  },
  data () {
    return {
      loading: true
    }
  },
  created () {
  },
  mounted () {
    console.log('进入页面------------------------------------')
    // 轮询接口
    const timers = window.setInterval(() => {
      setTimeout(res => {
      }, 0)// 利用定时器清除setInterval的每次叠加
    }, 60000)// 1分钟执行一次
    // this.once在离开当前路由时销毁定时器
    this.$once('hook:beforeDestroy', () => {
      clearInterval(timers)
    })
  }
}
</script>

<style lang="less" scoped>
  .extra-wrapper {
    line-height: 55px;
    padding-right: 24px;
    .extra-item {
      display: inline-block;
      margin-right: 24px;

      a {
        margin-left: 24px;
      }
    }
  }
  .antd-pro-pages-dashboard-analysis-twoColLayout {
    position: relative;
    display: flex;
    display: block;
    flex-flow: row wrap;
  }
  .antd-pro-pages-dashboard-analysis-salesCard {
    height: calc(100% - 24px);
    /deep/ .ant-card-head {
      position: relative;
    }
  }
  .dashboard-analysis-iconGroup {
    i {
      margin-left: 16px;
      color: rgba(0,0,0,.45);
      cursor: pointer;
      transition: color .32s;
      color: black;
    }
  }
  .analysis-salesTypeRadio {
    position: absolute;
    right: 54px;
    bottom: 12px;
  }
</style>
